pcall(function()
    require("load_jhqjs")
end)
local args = {
    env = {},
    outToFile = true -- 标准 out流 输出到文件
}
jhqjs.init(arg.outToFile, arg.env)

--jhqjs.load("/Users/zhang/Library/Application Support/Steam/steamapps/common/Don't Starve Together/dontstarve_steam.app/Contents/mods/ipv6_connection/dist/startClient.js")
jhqjs.load("/Users/zhang/Library/Application Support/Steam/steamapps/common/Don't Starve Together/dontstarve_steam.app/Contents/mods/ipv6_connection/dist/startServer.js")

local lop = function()
    while 1 do
        jhqjs.loop()
        coroutine.yield()
    end
end

local lopfn = coroutine.create(lop)

while 1 do
    coroutine.resume(lopfn)
end
